<?php
App::uses('AppModel', 'Model');
/**
 * MobileBase Model
 *
 * @property MobileModel $MobileModel
 * @property Manufacture $Manufacture
 * @property OperatingSystem $OperatingSystem
 */
class MobileBase extends AppModel {

/**
 * Use database config
 *
 * @var string
 */
	public $useDbConfig = 'connection_local';

/**
 * Use table
 *
 * @var mixed False or table name
 */
	public $useTable = 'mobile_base';

/**
 * Primary key field
 *
 * @var string
 */
	public $primaryKey = 'mobile_base_id';

/**
 * Display field
 *
 * @var string
 */
	public $displayField = 'mobile_base_name';

/**
 * Validation rules
 *
 * @var array
 */
	public $validate = array(
		'mobile_base_name' => array(
			'maxLength' => array(
				'rule' => array('maxLength',20),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
	);

	//The Associations below have been created with all possible keys, those that are not needed can be removed

/**
 * hasOne associations
 *
 * @var array
 */
	public $hasOne = array(
		'MobileModel' => array(
			'className' => 'MobileModel',
			'foreignKey' => 'mobile_base_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

/**
 * belongsTo associations
 *
 * @var array
 */
	public $belongsTo = array(
		'Manufacture' => array(
			'className' => 'Manufacture',
			'foreignKey' => 'manufacture_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'OperatingSystem' => array(
			'className' => 'OperatingSystem',
			'foreignKey' => 'operating_system_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);
}
